<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: dark)"><meta name="generator" content="Hexo 6.3.0">
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300italic,400,400italic,700,700italic%7CZCOOL+QingKe+HuangYou:300,300italic,400,400italic,700,700italic%7CNoto+Sans+Simplified+Chinese:300,300italic,400,400italic,700,700italic%7CJetBrains+Mono:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">

<link rel="stylesheet" href="/lib/@fortawesome/fontawesome-free/css/all.min.css" integrity="sha256-HtsXJanqjKTc8vVQjO4YMhiqFoXkfBsjBWcX91T1jr8=" crossorigin="anonymous">
  <link rel="stylesheet" href="/lib/animate.css/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="/lib/@fancyapps/ui/dist/fancybox/fancybox.css" integrity="sha256-RvRHGSuWAxZpXKV9lLDt2e+rZ+btzn48Wp4ueS3NZKs=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"wyatex.online","root":"/","images":"/images","scheme":"Pisces","darkmode":true,"version":"8.18.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":false,"height":500},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":true}}</script><script src="/js/config.js"></script>

    <meta name="description" content="动画的基本原理什么是动画?动画是通过快速连续排列批次差异极小的连续图像来制造运动错觉和变化错觉的过程 ——维基百科 满足四个条件：  快速 连续排列 彼此差异极小 制造错觉  动画的发展常见的前端动画技术：Sprite 动画、CSS 动画、JS 动画、SVG 动画、WebGL 动画 按应用分类：UI 动画、基于 Web 的游戏动画和动画数据可视化">
<meta property="og:type" content="article">
<meta property="og:title" content="前端动画实现-1">
<meta property="og:url" content="https://wyatex.online/%E5%89%8D%E7%AB%AF/%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%AE%9E%E7%8E%B0-1/index.html">
<meta property="og:site_name" content="Wyatex&#96;s blog">
<meta property="og:description" content="动画的基本原理什么是动画?动画是通过快速连续排列批次差异极小的连续图像来制造运动错觉和变化错觉的过程 ——维基百科 满足四个条件：  快速 连续排列 彼此差异极小 制造错觉  动画的发展常见的前端动画技术：Sprite 动画、CSS 动画、JS 动画、SVG 动画、WebGL 动画 按应用分类：UI 动画、基于 Web 的游戏动画和动画数据可视化">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-01-20T14:08:17.000Z">
<meta property="article:modified_time" content="2023-12-08T09:35:23.146Z">
<meta property="article:author" content="Wyatex">
<meta property="article:tag" content="JavaScript">
<meta property="article:tag" content="前端">
<meta property="article:tag" content="学习笔记">
<meta property="article:tag" content="CSS">
<meta property="article:tag" content="动画">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://wyatex.online/%E5%89%8D%E7%AB%AF/%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%AE%9E%E7%8E%B0-1/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://wyatex.online/%E5%89%8D%E7%AB%AF/%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%AE%9E%E7%8E%B0-1/","path":"前端/前端动画实现-1/","title":"前端动画实现-1"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>前端动画实现-1 | Wyatex`s blog</title>
  








  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">Wyatex`s blog</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">97</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">26</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">155</span></a></li><li class="menu-item menu-item-编程"><a href="/programming/" rel="section"><i class="fa fa-book fa-fw"></i>编程</a></li><li class="menu-item menu-item-蹲坑读物"><a href="/%E5%B9%B2%E8%B4%A7/%E5%BC%80%E5%8F%91%E4%BA%A4%E6%B5%81%E7%BE%A4%E5%88%86%E4%BA%AB%E8%AE%B0%E5%BD%95/" rel="section"><i class="fa fa-book fa-fw"></i>蹲坑读物</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%8A%A8%E7%94%BB%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86"><span class="nav-number">1.</span> <span class="nav-text">动画的基本原理</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BB%80%E4%B9%88%E6%98%AF%E5%8A%A8%E7%94%BB"><span class="nav-number">1.1.</span> <span class="nav-text">什么是动画?</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8A%A8%E7%94%BB%E7%9A%84%E5%8F%91%E5%B1%95"><span class="nav-number">1.2.</span> <span class="nav-text">动画的发展</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8A%A8%E7%94%BB%E5%8E%9F%E7%90%86"><span class="nav-number">1.3.</span> <span class="nav-text">计算机动画原理</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9B%BE%E5%BD%A2%E5%AD%A6"><span class="nav-number">1.3.1.</span> <span class="nav-text">计算机图形学:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8A%A8%E7%94%BB"><span class="nav-number">1.3.2.</span> <span class="nav-text">计算机动画:</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%88%86%E7%B1%BB"><span class="nav-number">2.</span> <span class="nav-text">前端动画分类</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#CSS-%E5%8A%A8%E7%94%BB"><span class="nav-number">2.1.</span> <span class="nav-text">CSS 动画</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS-animation"><span class="nav-number">2.1.1.</span> <span class="nav-text">CSS animation</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#transform"><span class="nav-number">2.1.2.</span> <span class="nav-text">transform</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#transition-API"><span class="nav-number">2.1.3.</span> <span class="nav-text">transition API</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%85%B3%E9%94%AE%E5%B8%A7-Keyframe"><span class="nav-number">2.1.4.</span> <span class="nav-text">关键帧 @Keyframe</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%A1%A5%E5%85%85"><span class="nav-number">2.1.5.</span> <span class="nav-text">补充</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#SVG-%E5%8A%A8%E7%94%BB"><span class="nav-number">2.2.</span> <span class="nav-text">SVG 动画</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%AE%80%E5%8D%95%E7%9A%84%E4%BE%8B%E5%AD%90%EF%BC%9A"><span class="nav-number">2.2.1.</span> <span class="nav-text">简单的例子：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%94%BB%E7%AC%94%E6%95%88%E6%9E%9C"><span class="nav-number">2.2.2.</span> <span class="nav-text">画笔效果</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#JS-%E5%8A%A8%E7%94%BB"><span class="nav-number">2.3.</span> <span class="nav-text">JS 动画</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#easing"><span class="nav-number">2.3.1.</span> <span class="nav-text">easing</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%A4%8D%E6%9D%82%E5%8A%A8%E7%94%BB"><span class="nav-number">2.3.2.</span> <span class="nav-text">复杂动画</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9B%B8%E5%85%B3%E6%8E%A8%E8%8D%90"><span class="nav-number">2.4.</span> <span class="nav-text">相关推荐</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8A%A8%E7%94%BB%E8%B5%84%E6%BA%90"><span class="nav-number">2.4.1.</span> <span class="nav-text">动画资源</span></a></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Wyatex"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Wyatex</p>
  <div class="site-description" itemprop="description">这里是我用来做笔记的网站哟~</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">155</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">26</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">97</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/wyatex" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;wyatex" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:wyatex@qq.com" title="E-Mail → mailto:wyatex@qq.com" rel="noopener me" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
    <div class="sidebar-inner sidebar-blogroll">
      <div class="links-of-blogroll animated">
        <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
          链接
        </div>
        <ul class="links-of-blogroll-list">
            <li class="links-of-blogroll-item">
              <a href="https://antfu.me/" title="https:&#x2F;&#x2F;antfu.me&#x2F;" rel="noopener" target="_blank">Anthony Fu</a>
            </li>
            <li class="links-of-blogroll-item">
              <a href="https://www.codesky.me/" title="https:&#x2F;&#x2F;www.codesky.me&#x2F;" rel="noopener" target="_blank">CodeSky</a>
            </li>
            <li class="links-of-blogroll-item">
              <a href="https://learn.lianglianglee.com/" title="https:&#x2F;&#x2F;learn.lianglianglee.com&#x2F;" rel="noopener" target="_blank">技术文章摘抄</a>
            </li>
        </ul>
      </div>
    </div>
        <div class="pjax">
        <div class="sidebar-inner sidebar-post-related">
          <div class="animated">
              <div class="links-of-blogroll-title"><i class="fa fa-signs-post fa-fw"></i>
    相关文章
  </div>
  <ul class="popular-posts">
    <li class="popular-posts-item">
      <a class="popular-posts-link" href="/TypeScript/ts%E7%AC%94%E8%AE%B0%EF%BC%884%EF%BC%89%EF%BC%9A%E7%B1%BB%E5%9E%8B%E5%AE%88%E5%8D%AB%E3%80%81%E7%B1%BB%E5%9E%8B%E5%85%BC%E5%AE%B9%E3%80%81%E5%A2%9E%E5%BC%BA%E7%B1%BB%E5%9E%8B%E7%B3%BB%E7%BB%9F/" rel="bookmark">
        <time class="popular-posts-time">2021-11-06</time>
        <br>
      ts笔记（4）：类型守卫、类型兼容、增强类型系统
      </a>
    </li>
  </ul>

          </div>
        </div>
        </div>
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://wyatex.online/%E5%89%8D%E7%AB%AF/%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%AE%9E%E7%8E%B0-1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Wyatex">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wyatex`s blog">
      <meta itemprop="description" content="这里是我用来做笔记的网站哟~">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="前端动画实现-1 | Wyatex`s blog">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          前端动画实现-1
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2022-01-20 22:08:17" itemprop="dateCreated datePublished" datetime="2022-01-20T22:08:17+08:00">2022-01-20</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2023-12-08 17:35:23" itemprop="dateModified" datetime="2023-12-08T17:35:23+08:00">2023-12-08</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%89%8D%E7%AB%AF/" itemprop="url" rel="index"><span itemprop="name">前端</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><h1 id="动画的基本原理"><a href="#动画的基本原理" class="headerlink" title="动画的基本原理"></a>动画的基本原理</h1><h2 id="什么是动画"><a href="#什么是动画" class="headerlink" title="什么是动画?"></a>什么是动画?</h2><p>动画是通过快速连续排列批次差异极小的连续图像来制造运动错觉和变化错觉的过程 ——维基百科</p>
<p>满足四个条件：</p>
<ul>
<li>快速</li>
<li>连续排列</li>
<li>彼此差异极小</li>
<li>制造错觉</li>
</ul>
<h2 id="动画的发展"><a href="#动画的发展" class="headerlink" title="动画的发展"></a>动画的发展</h2><p>常见的前端动画技术：Sprite 动画、CSS 动画、JS 动画、SVG 动画、WebGL 动画</p>
<p>按应用分类：UI 动画、基于 Web 的游戏动画和动画数据可视化</p>
<span id="more"></span>

<h2 id="计算机动画原理"><a href="#计算机动画原理" class="headerlink" title="计算机动画原理"></a>计算机动画原理</h2><h3 id="计算机图形学"><a href="#计算机图形学" class="headerlink" title="计算机图形学:"></a>计算机图形学:</h3><p>计算机视觉的基础，涵盖点、线、面、体、场的数学构造方法。</p>
<ul>
<li>几何和图形数据的输入、存储和压缩。</li>
<li>描述纹理、曲线、光影等算法。</li>
<li>物体图形的数据输出(图形接口、动画技术)，硬件和图形的交互技术。</li>
<li>图形开发软件的相关技术标准。</li>
</ul>
<h3 id="计算机动画"><a href="#计算机动画" class="headerlink" title="计算机动画:"></a>计算机动画:</h3><p>计算机图形学的分支，主要包含 2D、3D 动画。</p>
<p>无论动画多么简单，始终需要定义两个基本状态，即<strong>开始状态和结束状态</strong>。没有它们，我们将无法定义插值状态，从而填补了两者之间的空白。</p>
<p>帧：连续变换的多张画面,其中的每一幅画面都是一帧。</p>
<p>帧率：用于度量一定时间段内的帧数，通常的测量单位是 FPS (frame per second) 。</p>
<p>帧率与人眼：一般每秒 10-12 帧人会认为画面是连贯的，这个现象称为视觉暂留。对于一些电脑动画和游戏来说低于 30FPS 会感受到明显卡顿，目前主流的屏幕、显卡输出为 60FPS，效果会明显更流畅。</p>
<p>空白的补全方式有以下两种</p>
<ul>
<li>补间动画: 传统动画，主画师绘制关键帧，交给清稿部门，清稿部门的补间动画师补充关键帧进行交付。(类比到这里，补间动画师由浏览器来担任，如 keyframe，transition)</li>
<li>逐帧动画(Frame By Frame) : 从词语来说意味着全片每一帧逐帧都是纯手绘。(如 CSS 的 steps 实现精灵动画)</li>
</ul>
<h1 id="前端动画分类"><a href="#前端动画分类" class="headerlink" title="前端动画分类"></a>前端动画分类</h1><h2 id="CSS-动画"><a href="#CSS-动画" class="headerlink" title="CSS 动画"></a>CSS 动画</h2><h3 id="CSS-animation"><a href="#CSS-animation" class="headerlink" title="CSS animation"></a>CSS animation</h3><ul>
<li>animation-name : 指定应用的一系列动画</li>
<li>animation-duration : 制定一个动画周期的时长</li>
<li>animation-timing-function : 定义 CSS 动画在每一动画周期中执行的节奏</li>
<li>animation-delay : 定义动画于何时开始</li>
<li>animation-iteration-count : 定义动画在结束前运行的次数</li>
<li>animation-direction : 定义动画是否反向播放</li>
<li>animation-fill-mode : 设置 CSS 动画在执行之前和之后如何将样式应用于目标</li>
<li>animation-play-state : 定义一个动画是否运行或暂停</li>
</ul>
<h3 id="transform"><a href="#transform" class="headerlink" title="transform"></a>transform</h3><p>translate : 平移<br>scale : 缩放<br>rotate : 旋转<br>skew : 倾斜</p>
<h3 id="transition-API"><a href="#transition-API" class="headerlink" title="transition API"></a>transition API</h3><p>transition-property : 指定哪个或者哪些 CSS 属性用于过渡<br>transition-duration : 指定过度的时长<br>transition-timing-function : 指定一个函数,定义属性值怎么变化<br>transition-delay : 指定延迟</p>
<h3 id="关键帧-Keyframe"><a href="#关键帧-Keyframe" class="headerlink" title="关键帧 @Keyframe"></a>关键帧 @Keyframe</h3><p>可以使用：from to、百分比</p>
<p>优点 : 简单、高效 声明式的 不依赖于主线程，采用硬件加速(GPU) 简单的控制 keyframe animation 的播放盒暂停</p>
<p>缺点 : 不能动态修改或定义动画内容、不同的动画无法实现同步、多个动画无法堆叠</p>
<p>适用场景 : 简单的 h5 活动&#x2F;宣传页</p>
<h3 id="补充"><a href="#补充" class="headerlink" title="补充"></a>补充</h3><p>推荐库 : animation.css、shake.css、motioncanvas</p>
<p>CSS 补间动画使用 Transition API 和 Keyframe 实现</p>
<p>CSS 逐帧动画使用 Animation API 中的 steps 实现</p>
<h2 id="SVG-动画"><a href="#SVG-动画" class="headerlink" title="SVG 动画"></a>SVG 动画</h2><p>svg 是基于 XML 的矢量图形描述语言，它可以与 CSS 和 S 较好的配合，实现 svg 动画通常有三种方式：SMIL、JS、CSS</p>
<p>我们经常使用 animation, transform, transition 来实现 svg 动画，它比 JS 更加简单方便。</p>
<p>优点：通过矢量元素实现动画，不同的屏幕下均可获得较好的清晰度。可以实现一些特殊的效果，如：描字，形变，墨水扩散等。</p>
<p>缺点：使用方式较为复杂，过多使用可能会带来性能问题。</p>
<h3 id="简单的例子："><a href="#简单的例子：" class="headerlink" title="简单的例子："></a>简单的例子：</h3><ul>
<li>通过 js 修改 filter&#x2F;optaicy 等属性实现“溶解”效果</li>
<li>通过 svg 的 stroke-dashoffset 和 stroke-dasharray 实现画笔效果。<ul>
<li>stroke-dasharray 可控制用来描边的点划线的图案范式。它是一个数列，数与数之间用逗号或者空白隔开，指定短划线和缺口的长度。如果提供了奇数个值，则这个值的数列重复一次，从而变成偶数个值。因此，5,3,2 等同于 5,3,2,5,3,2。</li>
<li>stroke-dashoffset 属性指定了 dash 模式到路径开始的距离。</li>
</ul>
</li>
</ul>
<h3 id="画笔效果"><a href="#画笔效果" class="headerlink" title="画笔效果"></a>画笔效果</h3><p>stroke-dasharray：可以理解为虚线的产生，比如下面的效果就是 5px 的实线、5px 的空白交替虚线 如果是奇数元素就会自动重复一遍，会变成长度不一的虚线段</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">svg</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">line</span> <span class="attr">stroke-dasharray</span>=<span class="string">&quot;5, 5&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">svg</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>stroke-dashoffset：偏移量，就是相对于绘制起点的偏移量，偏移量不会大于线段总长度 比如设置为-20，就相当于向右移动了 20px。这个也是画线的核心实现属性。 画线效果就是让偏移量从 0 到线段的长度，长度可以用 path 属性的 getTotalLength()函数获取 比如：</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#path</span> &#123;</span><br><span class="line">  <span class="attribute">animation</span>: move <span class="number">3s</span> linear forwards;</span><br><span class="line">  stroke-dasharray: <span class="number">511px</span>, <span class="number">511px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> move &#123;</span><br><span class="line">  <span class="number">0%</span> &#123;</span><br><span class="line">    stroke-dashoffset: <span class="number">511px</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="number">100%</span> &#123;</span><br><span class="line">    stroke-dashoffset: <span class="number">0</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>这个效果原理：最初线条分为 511px 实线，和 511px 空隙，但是由于设置了 offset 使线条偏移不可见了，当不断修改 offset 后，线条慢慢出现。</p>
<h2 id="JS-动画"><a href="#JS-动画" class="headerlink" title="JS 动画"></a>JS 动画</h2><p>自己封装一个动画函数：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">animate</span>(<span class="params">&#123; easing, draw, duration &#125;</span>) &#123;</span><br><span class="line">  <span class="keyword">let</span> start = performance.<span class="title function_">now</span>() <span class="comment">//开始时间，使用perfromance更精确</span></span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="function">(<span class="params">resolve</span>) =&gt;</span> &#123;</span><br><span class="line">    <span class="comment">//便于拿到动画的终态(resolve)</span></span><br><span class="line">    <span class="title function_">requestAnimationFrame</span>(<span class="keyword">function</span> <span class="title function_">animate</span>(<span class="params">time</span>) &#123;</span><br><span class="line">      <span class="comment">//time表示当前执行时间</span></span><br><span class="line">      <span class="keyword">let</span> timeFraction = (time - start) / duration <span class="comment">//timeFraction是一个0-1的进度</span></span><br><span class="line">      <span class="keyword">if</span> (timeFraction &gt; <span class="number">1</span>) timeFraction = <span class="number">1</span> <span class="comment">//表示结束，则令为1并结束</span></span><br><span class="line">      <span class="keyword">let</span> progress = <span class="title function_">easing</span>(timeFraction) <span class="comment">//通过缓动函数改变到真实进度</span></span><br><span class="line">      <span class="title function_">draw</span>(progress) <span class="comment">//根据进度绘制</span></span><br><span class="line">      <span class="keyword">if</span> (timeFraction &lt; <span class="number">1</span>) &#123;</span><br><span class="line">        <span class="title function_">requestAnimationFrame</span>(animate)</span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="title function_">resolve</span>()</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;)</span><br><span class="line">  &#125;)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>核心参数：</p>
<ul>
<li>easing：缓动函数，是物理运动的核心参数，</li>
<li>draw：绘制函数，绘制具体的图形，利用 dom.style.transfrom 做主要变化</li>
<li>duration：持续时间</li>
</ul>
<p>调用的时候分别传入三个参数：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">animate(&#123;</span><br><span class="line">  easing(timeFraction) &#123;</span><br><span class="line">    return timeFraction;</span><br><span class="line">  &#125;,</span><br><span class="line">  draw(progress) &#123;</span><br><span class="line">    elem.style.transform = `translate($&#123;progress&#125;px,0)`;</span><br><span class="line">  &#125;</span><br><span class="line">  duration: 1000,</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>

<h3 id="easing"><a href="#easing" class="headerlink" title="easing"></a>easing</h3><p>可以模拟一些物理过程，比如匀速、匀加速、平抛等等 比如：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">easing</span>(<span class="params">timeFraction</span>) &#123;</span><br><span class="line">  <span class="comment">// 重力加速</span></span><br><span class="line">  <span class="keyword">return</span> <span class="number">0.5</span> * <span class="number">9.8</span> * timeFraction ** <span class="number">2</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">easing</span>(<span class="params">timeFractionX, timeFractionY</span>) &#123;</span><br><span class="line">  <span class="comment">// 平抛</span></span><br><span class="line">  <span class="keyword">return</span> &#123;</span><br><span class="line">    <span class="attr">x</span>: timeFractionX,</span><br><span class="line">    <span class="attr">y</span>: timeFractionY ** <span class="number">2</span>,</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">easing</span>(<span class="params">timeFraction</span>) &#123;</span><br><span class="line">  <span class="comment">// 拉弓 x=∫v⋅dt=−v0t+1/2at^2</span></span><br><span class="line">  <span class="keyword">return</span> &#123;</span><br><span class="line">    <span class="attr">x</span>: timeFraction,</span><br><span class="line">    <span class="attr">y</span>: -<span class="number">2</span> * timeFraction - timeFraction ** <span class="number">2</span>, <span class="comment">// v0 = 2，a = 2</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// 三次贝塞尔曲线B(t)=(1−t)^3 * P0 + 3t * (1−t)^2 * P1 + 3t^2 * (1−t) P2+ t^3 * P3,t∈[0,1]</span></span><br><span class="line"><span class="keyword">const</span> <span class="title function_">bezierPath</span> = (<span class="params">x1, y1, x2, y2, t</span>) =&gt; &#123;</span><br><span class="line">  <span class="keyword">const</span> x = <span class="number">3</span> * t * (<span class="number">1</span> - t) ** <span class="number">2</span> * x1 + <span class="number">3</span> * t ** <span class="number">2</span> * (<span class="number">1</span> - t) * x2 + t ** <span class="number">3</span> * <span class="number">1</span></span><br><span class="line">  <span class="keyword">const</span> y = <span class="number">3</span> * t * (<span class="number">1</span> - t) ** <span class="number">2</span> * y1 + <span class="number">3</span> * t ** <span class="number">2</span> * (<span class="number">1</span> - t) * y2 + t ** <span class="number">3</span> * <span class="number">1</span></span><br><span class="line">  <span class="keyword">return</span> [x, y]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="复杂动画"><a href="#复杂动画" class="headerlink" title="复杂动画"></a>复杂动画</h3><p>弹跳小球</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">async</span> <span class="keyword">function</span> <span class="title function_">autoDamping</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">let</span> damping = <span class="number">0.7</span>, <span class="comment">// 衰减系数</span></span><br><span class="line">    duration = <span class="number">1000</span>,</span><br><span class="line">    height = <span class="number">300</span></span><br><span class="line"></span><br><span class="line">  <span class="comment">// 当衰减到一定边界值时停止动画</span></span><br><span class="line">  <span class="keyword">while</span> (height &gt; <span class="number">1</span>) &#123;</span><br><span class="line">    <span class="keyword">const</span> <span class="title function_">down</span> = (<span class="params">progress</span>) =&gt; &#123;</span><br><span class="line">      ball.<span class="property">style</span>.<span class="property">transform</span> = <span class="string">`translate(0, <span class="subst">$&#123;height * (progress - <span class="number">1</span>)&#125;</span>px)`</span></span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">await</span> <span class="title function_">animate</span>(&#123;</span><br><span class="line">      <span class="attr">duration</span>: duration,</span><br><span class="line">      <span class="title function_">easing</span>(<span class="params">t</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> t ** <span class="number">2</span></span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">draw</span>: down,</span><br><span class="line">    &#125;)</span><br><span class="line">    height *= damping ** <span class="number">2</span> <span class="comment">// ** 2 可以使动画效果更加柔和</span></span><br><span class="line">    duration *= damping</span><br><span class="line">    <span class="keyword">const</span> <span class="title function_">up</span> = (<span class="params">progress</span>) =&gt; &#123;</span><br><span class="line">      ball.<span class="property">style</span>.<span class="property">transform</span> = <span class="string">`translate(0, <span class="subst">$&#123;-height * progress&#125;</span>px)`</span></span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">await</span> <span class="title function_">animate</span>(&#123;</span><br><span class="line">      <span class="attr">duration</span>: duration,</span><br><span class="line">      <span class="title function_">easing</span>(<span class="params">t</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="number">2</span> * t - t ** <span class="number">2</span></span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="attr">draw</span>: down,</span><br><span class="line">    &#125;)</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>椭圆运动，公式：x^2 &#x2F; a^2 + y^2 &#x2F; b^2 &#x3D; 1, x &#x3D; a * cos(a), y &#x3D; b *sin(a)</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="title function_">draw</span> = (<span class="params">progress</span>) =&gt; &#123;</span><br><span class="line">  <span class="keyword">const</span> x = <span class="number">150</span> * <span class="title class_">Math</span>.<span class="title function_">cos</span>(<span class="title class_">Math</span>.<span class="property">PI</span> * <span class="number">2</span> * progress)</span><br><span class="line">  <span class="keyword">const</span> y = <span class="number">100</span> * <span class="title class_">Math</span>.<span class="title function_">sin</span>(<span class="title class_">Math</span>.<span class="property">PI</span> * <span class="number">2</span> * progress)</span><br><span class="line">  ball.<span class="property">style</span>.<span class="property">transform</span> = <span class="string">`translate(<span class="subst">$&#123;x&#125;</span>px, <span class="subst">$&#123;y&#125;</span>px)`</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="title function_">animate</span>(&#123;</span><br><span class="line">  <span class="attr">duration</span>: <span class="number">2000</span>,</span><br><span class="line">  <span class="title function_">easing</span>(<span class="params">t</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">2</span> * t - t ** <span class="number">2</span></span><br><span class="line">  &#125;,</span><br><span class="line">  draw,</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>

<p>为什么使用<code>performance.now()</code>而非<code>Date.now()</code>？为什么使用<code>requestAnimationFrame</code>而非<code>setTimeout</code>或者<code>setInterval</code>:</p>
<ul>
<li>performance.now()会以恒定速度自增,精确到微妙级别,不易被篡改.</li>
<li>requestAnimationFrame 会把每一帧中的所有 DOM 操作集中起来，在一次重绘或回流中就完成，并且重绘或回流的时间间隔紧紧跟随浏览器的刷新频率，一般来说，这个频率为每秒 60 帧。在隐藏或不可见的元素中，requestAnimationFrame 将不会进行重绘或回流，这当然就意味着更少的的 cpu，gpu 和内存使用量。</li>
</ul>
<h2 id="相关推荐"><a href="#相关推荐" class="headerlink" title="相关推荐"></a>相关推荐</h2><h3 id="动画资源"><a href="#动画资源" class="headerlink" title="动画资源"></a>动画资源</h3><p>动画代码示例：</p>
<ul>
<li>codepen.com</li>
<li>codesandbox.com</li>
</ul>
<p>设计网站：</p>
<ul>
<li>dribbble.com</li>
</ul>
<p>动画制作工具（一般都是 UE、UI 同学使用)：</p>
<ul>
<li>2D：Animate CC、After Effects</li>
<li>3D：Cinema 4D、Blender、Autodesk Maya</li>
</ul>
<p>svg :</p>
<ul>
<li>Snap.svg - 现代 SVG 图形的 JavaScript 库。</li>
<li>Svg.js - 用于操作和动画 SVG 的轻量级库。</li>
</ul>
<p>js :</p>
<ul>
<li></li>
<li>GSAP - JavaScript 动画库。</li>
<li>TweenJs - 一个简单但功能强大的 JavaScript 补间&#x2F;动画库。CreateJS 库套件的一部分。</li>
<li>Velocity - 加速的 JavaScript 动画。</li>
</ul>
<p>css :</p>
<ul>
<li><p>Animate.css - CSS 动画的跨浏览器库。像一件简单的事情一样容易使用。</p>
</li>
<li><p>canvas :</p>
</li>
<li><p>EaselJs - EaselJS 是一个用于在 HTML5 中构建高性能交互式 2D 内容的库</p>
</li>
<li><p>Fabric.js - 支持动画的 JavaScript 画布库。</p>
</li>
<li><p>Paper.js - 矢量图形脚本的瑞士军刀 - Scriptographer 使用 HTML5Canvas 移植到 JavaScript 和浏览器。</p>
</li>
<li><p>Pixijs - 使用最快、最灵活的 2D WebGL 渲染器创建精美的数字内容。</p>
</li>
</ul>

    </div>

    
    
    

    <footer class="post-footer">
          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>Wyatex
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="https://wyatex.online/%E5%89%8D%E7%AB%AF/%E5%89%8D%E7%AB%AF%E5%8A%A8%E7%94%BB%E5%AE%9E%E7%8E%B0-1/" title="前端动画实现-1">https://wyatex.online/前端/前端动画实现-1/</a>
  </li>
  <li class="post-copyright-license">
      <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/tags/JavaScript/" rel="tag"># JavaScript</a>
              <a href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag"># 前端</a>
              <a href="/tags/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" rel="tag"># 学习笔记</a>
              <a href="/tags/CSS/" rel="tag"># CSS</a>
              <a href="/tags/%E5%8A%A8%E7%94%BB/" rel="tag"># 动画</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/React/React17%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0-1/" rel="prev" title="React17学习笔记-1">
                  <i class="fa fa-angle-left"></i> React17学习笔记-1
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/NodeJS/Node-js%E4%B8%8E%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98-1/" rel="next" title="Node.js与开发实战（1）">
                  Node.js与开发实战（1） <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2019 – 
    <span itemprop="copyrightYear">2024</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">Wyatex</span>
  </div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>

    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script size="300" alpha="0.6" zIndex="-1" src="/lib/ribbon.js/dist/ribbon.min.js"></script>
  <script src="/lib/animejs/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="/lib/@next-theme/pjax/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="/lib/@fancyapps/ui/dist/fancybox/fancybox.umd.js" integrity="sha256-q8XkJ6dj5VwSvzI8+nATCHHQG+Xv/dAZBCgqmu93zOY=" crossorigin="anonymous"></script>
  <script src="/lib/lozad/dist/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="/lib/hexo-generator-searchdb/dist/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>



  
  <script data-pjax async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
